<?php
/*
 * Created on Sep 14, 2007
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
  //Does not go back to home instead goes back to AdminHome
//$_COOKIE['prevPage'] = "AdminHome.php";

//$_COOKIE['prevSearch'] = "";
require('./View/Security.php');
require('./View/ViewFunctions.php'); 
require('./View/BoxView.php');
require('./Model/SpecalizedInserts.php');
require('./Controller/HelperCheck.php');

$query = "SELECT CellType.ID AS \"CellTypeID\", CellType.Name AS 'Cell Name', Modification.id AS \"ModificationID\", Modification.Name 'Modification Name', Researcher.ID AS \"ResearcherID\", Researcher.Name, FrozenTube.Location, FrozenTube.ContainerID, FrozenTube.id FROM FrozenTube JOIN CellType ON (FrozenTube.CellTypeID=CellType.ID) JOIN Modification ON (FrozenTube.ModifiedByID=Modification.ID) JOIN Researcher ON ( FrozenTube.FrozenByID=Researcher.ID) WHERE FrozenTube.ContainerID="; 
$query .= mysql_real_escape_string($_GET['ContainerID']);
$result = mysql_query($query) or die('Query failed in View Box: ' . mysql_error() . "Query: $query");
$select = CreateBoxView($result, array('CellTypeID' => 'ViewGeneric.php', 'ModificationID' => 'ViewGeneric.php', 'ResearcherID' => 'ViewGeneric.php'), true);

$containerID = $_GET['ContainerID'];
$line['CellTypeID'] = 4;
$line['ModifiedByID'] = 4;
$line['FrozenByID'] = 5;

$search = makeSearchLink($_GET)
?>
<form action="AdminUpdate.php?<?php echo $search; ?>" name="changeBox" onsubmit="return validate_form(this)" method="POST">
<table>
	<tr>
		<td align="center" valign="top">
				<input type="submit" name="clearBox" onClick="document.pressed='clear'" value="Clear the Box">
		</td>
	</tr>
</table>
			<?php require('./View/ModifyTubeGeneric.php'); ?>
			
			<input style="height: 50px; width: 200px" type="submit" name="change" value="Update"> </br>
			<?php  echo $select?>
<input style="height: 50px; width: 200px" type="submit" name="change" value="Update">
</form>
<?php makeBackButton() ?>